﻿using System;
using System.Windows.Forms;

namespace SantaSLittleIrcHelper
{
    class TLabel : Label
    {

        private string _key;
        private string[] _args;

        public string Key
        {
            get { return this._key; }
            set { this._key = value; this.translateThis(); }
        }

        public string[] Args
        {
            get { return this._args; }
            set { this._args = value; this.translateThis(); }
        }

        public void translateThis()
        {
            if (Key != null)
            {
                this.Text = Languages.Instance.get(this.Key, this.Args);
            }
            else
            {
                this.Text = String.Empty;
            }
        }

    }
}
